package com.yubest.designpattern.behavior.iterator;

import lombok.AllArgsConstructor;
import lombok.Data;

/**
 * 集合-实现
 *
 * @Author: hweiyu
 * @Date: 2022/10/27 11:14
 */
@Data
@AllArgsConstructor
public class CollectImpl implements Collect {

    private Integer[] items;

    @Override
    public Iterator createIterator() {
        return new IteratorImpl(items, 0);
    }
}
